package 曾世昌12_19.demo3;

import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;

public class MainApp {
    public static void main(String[] args) throws InvocationTargetException, IllegalAccessException {
        Uesr uesr = new Uesr();
        HashMap<String, String[]> map = new HashMap<>();
        map.put( "loginName", new String[]{"zhangsan"} );
        map.put( "password", new String[]{"888888"} );
        map.put( "sex", new String[]{"男"} );
        map.put( "edu", new String[]{"专科"} );
        map.put( "hobby", new String[]{"读书", "唱歌", "旅游"} );
        BeanUtils.populate( uesr, map );
        System.out.println( uesr );
    }
}
